package com.lc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lc.mapper.UmsPcdDicMapper;
import com.lc.pojo.UmsPcdDic;
import com.lc.service.UmsPcdDicService;
import com.lc.utils.TreeUtil;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UmsPcdDicServiceImpl extends ServiceImpl<UmsPcdDicMapper, UmsPcdDic> implements UmsPcdDicService {

    @Resource
    private UmsPcdDicMapper umsPcdDicMapper;

    //省市区列表
    @Override
    public List<UmsPcdDic> getPcdList() {
        List<UmsPcdDic> umsPcdDicsList = umsPcdDicMapper.selectList(null);
        return TreeUtil.buildTree(umsPcdDicsList);
    }

}
